Attribute VB_Name = "ModCladdFinderII"

DefInt A-Z

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long


Const WM_CLOSE = &H10
Const GW_HWNDFIRST = 0
Const GW_HWNDNEXT = 2


Sub killapp()
Dim FhWnd
Dim txthwnd

FhWnd = FindWindow(vbNullString, frmClassFinder.txtTitle.Text)
    Dim Wnd, lResult As Long, iResult
             

lResult = SendMessage(FhWnd, WM_CLOSE, 0, 0&)

reflist

    

End Sub

Sub reflist()
frmClassFinder.lstOpenWindows.Clear
frmClassFinder.lblCount.Caption = GetOpenWindowNames & " open Windows."
End Sub

